<?
	session_start();
	include('conn.php');
	$obj = json_decode($_REQUEST["dataset"]);	
	
	$qry1 = "select CustId from Customer where CustomerName='$obj->cname';";
	$row1=mysql_fetch_array(mysql_query($qry1));
	$cid = $row1['CustId'];
	
	$qry2 = "select socid from society where societyname='$obj->soc';";
	$row2=mysql_fetch_array(mysql_query($qry2));
	$sid = $row2['socid'];
	
	$qry3 = "insert into payments(CustId,socId,RoomNumber,TelNo,paydate,payamount,balance,notes) values('$cid','$sid','$obj->member','$obj->phone','$obj->paydate','$obj->amt','$obj->bal','$obj->note');";		
	echo "<br> $qry3 <br>";
	$res3 = mysql_query($qry3);		
?>